const routes = [
  {
    //重定向到/login
    path: "/",
    redirect: "/login",
  },

  // 登录页
  {
    path: "/login",
    meta: {
      nologin: true,
    },
    components: {
      default: () => import("@/views/Login/index.vue"),
    },
  },

  //首页
  {
    path: "/home",
    component: () => import("@/views/Home/index.vue"),
    meta: {
      nema: "首页",
    },
  },

  // 货架管理
  {
    path: "/shop/shelves/list",
    component: () => import("@/views/shelves/list.vue"),
  },
  //补货列表
  {
    path: "/shop/store/list",
    component: () => import("@/views/shelves/store-list.vue"),
  },
  //经营范围列表
  {
    path: "/product/range/list",
    component: () => import("@/views/shelves/range-list.vue"),
  },
  //经营范围编辑
  {
    path: "/product/range/edit",
    component: () => import("@/views/shelves/range-edit.vue"),
  },
  //经营范围详情
  {
    path: "/product/range/detail",
    component: () => import("@/views/shelves/rang.dele.vue"),
  },

  {
    path: "/shop/shelves/list",
    component: () => import("@/views/shelves/list.vue"),
  },

  //供应商列表
  {
    path: "/purchase/supplier/list",
    component: () => import("../views/Purchase/supplier/list.vue"),
  },

  //供应商新增
  {
    path: "/purchase/supplier/edit",
    component: () => import("../views/Purchase/supplier/newAdd.vue"),
  },

  //供应商详情
  {
    path: "/purchase/supplier/detail",
    component: () => import("../views/Purchase/supplier/detail.vue"),
  },

  //申请单列表
  {
    path: "/purchase/apply/list",
    component: () => import("../views/Purchase/apply/list.vue"),
  },

  //申请单新增
  {
    path: "/purchase/apply/edit",
    component: () => import("../views/Purchase/apply/newAdd.vue"),
  },

  //申请单详情页
  {
    path: "/purchase/apply/detail",
    component: () => import("../views/Purchase/apply/detail.vue"),
  },

  //采购单列表
  {
    path: "/purchase/order/list",
    component: () => import("../views/Purchase/purOrder/list.vue"),
  },

  //采购单编辑
  {
    path: "/purchase/order/edit",
    component: () => import("../views/Purchase/purOrder/edit.vue"),
  },

  //入库列表
  {
    path: "/purchase/store/list",
    component: () => import("../views/Purchase/Instore/list.vue"),
  },

  //入库编辑
  {
    path: "/purchase/store/edit",
    component: () => import("../views/Purchase/Instore/edit.vue"),
  },

  //入库详情
  {
    path: "/purchase/store/detail",
    component: () => import("../views/Purchase/Instore/detail.vue"),
  },

  //退货列表
  {
    path: "/purchase/returns/list",
    component: () => import("../views/Purchase/Returns/list.vue"),
  },

  //退货编辑
  {
    path: "/purchase/returns/edit",
    component: () => import("../views/Purchase/Returns/edit.vue"),
  },

  //退货详情
  {
    path: "/purchase/returns/detail",
    component: () => import("../views/Purchase/Returns/detail.vue"),
  },

  //财务单列表
  {
    path: "/purchase/finance/list",
    component: () => import("../views/Purchase/Finance/list.vue"),
  },

  //财务单详情
  {
    path: "/purchase/finance/detail",
    component: () => import("../views/Purchase/Finance/detail.vue"),
  },

  //产品管理
  //产品列表
  {
    path: "/product/list",
    component: () => import("../views/product/ProductMan/list.vue"),
  },
  //产品编辑
  {
    path: "/product/edit",
    component: () => import("../views/product/ProductMan/edit.vue"),
  },
  //产品详情
  {
    path: "/product/detail",
    component: () => import("../views/product/ProductMan/details.vue"),
  },
  //样品管理
  //样品列表
  {
    path: "/product/sample/list",
    component: () => import("../views/product/Sample/list.vue"),
  },
  //样品编辑
  {
    path: "/product/sample/edit",
    component: () => import("../views/product/Sample/edit.vue"),
  },

  //门店列表
  {
    path: "/shop/list",
    component: () => import("@/views/shop/store_list.vue"),
  },
  //门店详情
  {
    path: "/shop/detail",
    component: () => import("@/views/shop/store_detail.vue"),
  },
  //门店编辑
  {
    path: "/shop/edit",
    component: () => import("@/views/shop/store_edit.vue"),
  },
  //考勤管理
  {
    path: "/shop/records",
    component: () => import("@/views/shop/store_records.vue"),
  },
  //绩效管理
  {
    path: "/shop/merits",
    component: () => import("@/views/shop/store_merits.vue"),
  },
  //门店商品管理
  {
    path: "/shop/goods",
    component: () => import("@/views/shop/store_goods.vue"),
  },
  //404页面
  {
    path: "/:pathMatch(.*)*",
    component: () => import("../views/NotFound/index.vue"),
  },
  {
    path: "/user/edit",
    component: () => import("../views/userManagement/userEdit/index.vue"),
  },
  {
    path: "/user/list",
    component: () => import("../views/userManagement/userlist/index.vue"),
  },
];
export default routes;
